load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

rust_library(
    name = "sha2",
    srcs = glob(["src/**"]),
    crate_name = "ic_crypto_sha2",
    version = "0.9.0",
    deps = ["//rs/crypto/internal/crypto_lib/sha2"],
)

rust_doc_test(
    name = "sha2_doc_test",
    crate = ":sha2",
)

rust_test(
    name = "sha224_test",
    srcs = ["tests/sha224.rs"],
    deps = [
        # Keep sorted.
        ":sha2",
    ],
)

rust_test(
    name = "sha256_test",
    srcs = ["tests/sha256.rs"],
    deps = [
        # Keep sorted.
        ":sha2",
    ],
)
